#include <gui/screen2_screen/screen2View.hpp>
#include <gui/screen2_screen/screen2Presenter.hpp>

screen2Presenter::screen2Presenter(screen2View &v)
    : view(v)
{
}

void screen2Presenter::activate()
{
}

void screen2Presenter::deactivate()
{
}
void screen2Presenter::model_view(uint8_t flag, ...)
{
    int32_t para[10];
    va_list argptr;
    va_start(argptr, flag);

    if (flag == 1)
    {
        para[0] = va_arg(argptr, int32_t);
        view.model_view(flag, para[0]);
    }
    else if (flag == 2)
    {
        para[0] = va_arg(argptr, int32_t);
        para[1] = va_arg(argptr, int32_t);
        para[2] = va_arg(argptr, int32_t);
        para[3] = va_arg(argptr, int32_t);
        view.model_view(flag, para[0], para[1], para[2], para[3]);
    }

    va_end(argptr);
}
